import React from "react";
import { DotLottieReact } from "@lottiefiles/dotlottie-react";

export interface LoadingProps {
  className?: string;
  style?: React.CSSProperties;
  visible?: boolean;
}

const Loading = ({ visible }: LoadingProps) => {
  if (!visible) return null;
  return (
    <div className="w-screen h-screen flex justify-center items-center fixed top-0 left-0 z-50">
      {/* <img src="lottie/Loading.svg" /> */}
      <DotLottieReact
        className="w-96"
        src="/lottie/loading.json"
        loop
        autoplay
      />
    </div>
  );
};

export default Loading;
